#include"country.h"
Country::Country() {}

Country::~Country()
{

}

void Country::getValue(int& numCode, QString& alphaCode, QString& chiName, QString& engName, int& teamSize, int& gold, int& silver, int& bronze)
{
    numCode= this->numCode;
    alphaCode = this->alphaCode;
    chiName = this->chiName;
    engName = this->engName;
    teamSize = this->teamSize;
    gold = this->gold;
    silver = this->silver;
    bronze = this->bronze;
}

void Country::setValue(int& numCode, QString& alphaCode, QString& chiName, QString& engName, int& teamSize, int& gold, int& silver, int& bronze)
{
    this->numCode = numCode;
    this->alphaCode = alphaCode;
    this->chiName = chiName;
    this->engName = engName;
    this->teamSize = teamSize;
    this->gold = gold;
    this->silver = silver;
    this->bronze = bronze;
}

void Country::getMedals(int& gold, int& silver, int& bronze)
{
    gold = this->gold;
    silver = this->silver;
    bronze = this->bronze;
}


void Country::read(QTextStream& aStream)
{
    aStream >> numCode;
    aStream >> alphaCode;
    aStream >> chiName;
    aStream >> engName;
    aStream >> teamSize;
    aStream >> gold;
    aStream >> silver;
    aStream >> bronze;
}

void Country::save(QTextStream& aStream)
{
    aStream << numCode << "\t";
    aStream << alphaCode << "\t";
    aStream << chiName << "\t";
    aStream << engName << "\t";
    aStream << teamSize << "\t";
    aStream << gold << "\t";
    aStream << silver << "\t";
    aStream << bronze << "\n";
}
